-- @owner: zou_jialiang050
-- @date: 2024/4/2
-- @testpoint: sysdate作为触发器名

--step1:建表;expect:成功drop table if exists t_sysdate_0009;drop table if exists t_sysdate_0009_1;create table t_sysdate_0009(id1 int, id2 int, id3 int);create table t_sysdate_0009_1(id1 int, id2 int, id3 int);--step2:创建触发器函数;expect:成功create or replace function f_sysdate_0009() returns triggercontains sqlleakproof as$$declarebegininsert into t_sysdate_0009_1 values(new.id1, new.id2, new.id3);return new;end;$$ language plpgsql;/--step3:创建触发器使用sysdate作为触发器名;expect:成功create trigger sysdate before insert on t_sysdate_0009for each rowexecute procedure f_sysdate_0009();/insert into t_sysdate_0009 values(100,200,300);select * from t_sysdate_0009;select * from t_sysdate_0009_1;select pg_get_functiondef('f_sysdate_0009'::regproc::oid);--step4:清理环境;expect:成功drop trigger if exists sysdate;drop function if exists f_sysdate_0009;drop table if exists t_sysdate_0009;drop table if exists t_sysdate_0009_1;